﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Xml;
using WebServiceKFC.Utils;

namespace WebServiceKFC.MonAnF
{
    public class PhanAnComboDTO: PhanAnDTO
    {
        public PhanAnComboDTO()
        {
            //MonAnFactoryDTO.add(this);
        }

        public override string LayTenLoaiDoiTuong()
        {
            return "PhanAnCombo";
        }

        public override MonAnDTO Clone()
        {
            MonAnDTO monAnNew = new PhanAnComboDTO();
            monAnNew.ChiTietMonAn = ChiTietMonAn;
            monAnNew.DonGia = DonGia;
            monAnNew.LoaiDoiTuong = LoaiDoiTuong;
            monAnNew.MaMonAn = MaMonAn;
            monAnNew.SoLuong = SoLuong;
            monAnNew.TenMonAn = TenMonAn;
            ((PhanAnDTO)monAnNew).DsMaMonAnDon = new List<string>();

            foreach (var i in this.DsMaMonAnDon)
                ((PhanAnDTO)monAnNew).DsMaMonAnDon.Add(i);

            ((PhanAnDTO)monAnNew).DsSoLuongMon = new List<int>();

            foreach (var item in this.DsSoLuongMon)
                ((PhanAnDTO)monAnNew).DsSoLuongMon.Add(item);

            return monAnNew;
        }
    }
}